package com.study.jvm;

import java.util.concurrent.Callable;

public class GCTest implements Callable{

    long time;

    public GCTest(long time) {
        this.time = time;
    }

    @Override
    protected void finalize() throws Throwable {
        System.out.println("当前对象被回收了");
    }


    @Override
    public Object call() throws Exception {
        Thread.sleep(time);
        return 1;
    }



}
